import http from "../utils/http";
import type { IUser, IConfig } from "./request";
import GLOBAL from "../utils/globelConfig";

// 获取系统配置
export const getSomeShmetroConfig = (params: IConfig) => {
  return new http(GLOBAL.SHIOR_HOME).instance.post(
    "/systemManage/getSomeShmetroConfig/",
    params
  );
};

// 获取菜单树
export const getIORAuthorityTree = (params: IUser) => {
  return new http(GLOBAL.SHIOR_HOME).instance.post(
    "/getIORAuthorityTree",
    params
  );
};

// 获取用户信息
export const getCurrentUser = () => {
  return new http(GLOBAL.SHIOR_HOME).instance.get("/getCurrentUser");
};

// 站点和gps
export const getInfoGroupByType = () => {
  return new http(GLOBAL.SHIOR_HOME).instance.get("/getInfoGroupByType");
};

// 
export const selectConfigurationTrainType = (params: any) => {
  return new http(GLOBAL.SHIOR_HOME).instance.get(
    "/selectConfigurationTrainType" + params.lineNo + "/" + params.trainType
  );
};
